package com.maiji.cloud.entities.shopingmall;

import com.maiji.cloud.utils.Arith;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@NoArgsConstructor
@Data
@Accessors(chain=true)
public class ShareOrderRuleSection implements Comparable{

    // 参与活动的最低购物金额数
    private Double orderMoney;

    // 最大可返现比例
    private Double maxReturRatio;

    @Override
    public int compareTo(Object o) {
        ShareOrderRuleSection shareOrderRuleSection = (ShareOrderRuleSection) o;
        return (int) Arith.subtract(0, shareOrderRuleSection.getOrderMoney(), this.orderMoney);
    }

}
